<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>/easyUI/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/easyUI/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/easyUI/css/demo.css">
	<script src="<%=basePath%>/js/jquery-1.8.3.js"></script>
	<!--jquery.easyui.min.js包含了easyUI中的所有插件-->
	<script src="<%=basePath%>/js/jquery.easyui.min.js"></script>
<title>Insert title here</title>

<script type="text/javascript">
	$(function(){
		
			
				
				
				$.post("<%=basePath%>getInfoByUname.do",null,function(data){
					if(data!=null){
						
						$('#myform').form('load',{	   //调用load方法把所选中的数据load到表单中,非常方便
							id:data.id,
							roletype:data.roletype,
							viptype:data.viptype,
							username:data.username,
							realname:data.realname,
							email:data.email,
							tel:data.tel,
							postcode:data.postcode,
							idcard:data.idcard,
							address:data.address
						});
					}
				},"json");
		
		
	});

</script>

</head>
<body class="layui-layout-body">
	<!-- 修改用户信息 -->
			
		  <form id="myform" enctype="multipart/form-data" method="post" action="<%=basePath%>updateUsersByPrimaryKeySelective.do">
		  	<br>
		  		<div style="margin-left: 35px">
		  		<input name="id" type="text" hidden="hidden">
		  		用户角色:
		  			<select  class="easyui-combobox" name="roletype" style="width:200px;" >  
					    <option >---请选择---</option>  
					    <option value="2">会员</option>  
					    <option value="1">管理员</option>  
					</select>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  		会员类型:
		  				<select  class="easyui-combobox" name="viptype" style="width:200px;">  
					    <option>---请选择---</option>  
					    <option value="注册会员">注册会员</option>  
					    <option value="消费会员">消费会员</option>  
					    <option value="VIP会员">VIP会员</option>  
					    <option value="加盟店">加盟店</option>  
						</select> 
				</div> 
						<br>
				<div style="margin-left: 35px">		
		  		用户名:<input class="easyui-validatebox" name="username"  data-options="required:true" /> 
		  		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  		姓名:<input  class="easyui-validatebox" name="realname" data-options="required:true" />  
		  		 		<br><br>
		  		</div>
		  		
		  		<div style="margin-left: 35px">	 
		  		联系电话:<input type="text" class="easyui-numberbox" name="tel" data-options="min:0"></input>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		  		电子邮件:<input  class="easyui-validatebox" name="email" data-options="required:true,validType:'email'" />  
		  				<br><br>
		  		</div>
		  		
		  		
		  		<div style="margin-left: 35px">
		  		邮政编码:<input type="text" class="easyui-numberbox"  name="postcode" data-options="min:0"></input>
		  		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
		  		身份证号:<input type="text" class="easyui-numberbox" name="idcard" data-options="min:0"></input>
		  		<br><br>
		  		</div>
		  		
		  		
		  		<div style="margin-left: 35px">
		  		收货地址: 
		  			<textarea name="address" id="textarea" cols="45" rows="5"></textarea>
		  				<br><br>
		  		</div>
		  		
		  		<!-- idcardpicb -->
		  		<div style="margin-left: 35px">		
		  		身份证照片正面:<input type="file" name="files" />
		  		<br><br>
		  		身份证照片反面:<input type="file" name="files" />
		  		</div>
		  		
		  		<!-- 推荐人用户名默认为当前登录用户
		  		会员状态默刚注册未激活
		  		自动创建一个账户
		  		登录密码默认为123456	
		  		注册时间 -->
		  		
		  		<div style="margin-left: 80px">
		  		<br><br><br>
		  		
				 <input type="submit" id="updatesave"  value="保存">
				<!--<a id="save"  class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>  --> 
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a id="updatereset"  class="easyui-linkbutton" data-options="iconCls:'icon-reload'">重置</a>  
				<!-- <input type="reset" value="重置"> -->
				</div>
		 </form>
		
</body>
</html>